package com.hainatong.shiphelper.module.handlejob;

import androidx.appcompat.app.ActionBar;
import com.gyf.immersionbar.ImmersionBar;
import com.hainatong.shiphelper.R;
import com.hainatong.shiphelper.databinding.ActivityHandleJobDetailBinding;
import com.hainatong.mvvmbase.base.BaseMvvmActivity;
import com.hainatong.mvvmbase.base.NoViewModel;

public class HandleJobDetailActivity extends BaseMvvmActivity<ActivityHandleJobDetailBinding, NoViewModel>
{


    @Override
    protected int getLayoutId()
    {
        return R.layout.activity_handle_job_detail;
    }

    @Override
    protected int getBindingVariable() {
        return 0;
    }

    @Override
    protected void initView()
    {
        ImmersionBar.with(this).init();

        //final BottomSheetBehavior bottomSheetBehavior =  BottomSheetBehavior.from(viewDataBinding.bottomView);

        //bottomSheetBehavior.setPeekHeight(SizeUtils.dp2px( 50));

        /*
        viewDataBinding.text.setOnClickListener( v -> {


            bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);

            //根据状态不同显示隐藏
            if (bottomSheetBehavior.getState() == BottomSheetBehavior.STATE_HIDDEN)
            {
                bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
            }
            else if (bottomSheetBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED)
            {
                bottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
            }

        } );
        */


        viewDataBinding.toolbar.setTitle("");
        viewDataBinding.toolbar.setNavigationOnClickListener(view -> {
            supportFinishAfterTransition();
        });
        setSupportActionBar(viewDataBinding.toolbar);
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null)
        {
            // 返回键
            actionBar.setDisplayHomeAsUpEnabled(true);
            // 显示 toolbar内容
            actionBar.setDisplayShowCustomEnabled(true);
        }
        //设置StatusBar透明

    }

    @Override
    protected void initData()
    {
    }

    @Override
    protected void onRetryBtnClick()
    {
    }






}
